/**
 * @author Kaizi
 * @date 2020/03/14
 * @description 注册第三方组件
 */

import VueI18n from 'vue-i18n';
// 复制到粘贴板插件
import VueClipboard from 'vue-clipboard2';

import {
  ActionSheet,
  Button,
  Cell,
  CellGroup,
  // Form,
  Icon,
  Loading,
  Sticky,
  Dialog,
  Popup,
  Field,
  Step,
  Steps,
  Switch,
  Toast,
  NavBar,
  Lazyload,
  Uploader
} from 'vant';

const plugins = [
  VueI18n,
  VueClipboard,
  ActionSheet,
  Button,
  Cell,
  CellGroup,
  Icon,
  // Form,
  Loading,
  Sticky,
  Dialog,
  Popup,
  Field,
  Step,
  Steps,
  Switch,
  Toast,
  NavBar,
  Lazyload,
  Uploader
];

export default Vue => {
  // 复制到粘贴板插件
  VueClipboard.config.autoSetContainer = true;
  plugins.forEach(plugin => {
    Vue.use(plugin);
  });
};
